﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BookShop3Tables.Models;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Data.Entity;

namespace BookShop3Tables.Models
{
    public class BookContext : DbContext
    {
        public DbSet<Book> Books { get; set; }
        public DbSet<Category> Categories { get; set; }
        public DbSet<Author> Authors { get; set; }
        public DbSet<Person> People { get; set; }
        public DbSet<Cart> Carts { get; set; }
        public DbSet<Order> Orders { get; set; }
        public DbSet<OrderDetail> OrderDetails { get; set; }


        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
            
               
        }
    }
}